package org.example.beans;

import java.util.Set;

public class Schoolmaster {
    private Integer sid;
    private String sname;
//关联属性
    private Set<Teacher> teachers;

    public Schoolmaster() {
    }

    public Schoolmaster(Integer sid, String sname, Set<Teacher> teachers) {
        this.sid = sid;
        this.sname = sname;
        this.teachers = teachers;
    }

    public Integer getSid() {
        return sid;
    }

    public String getSname() {
        return sname;
    }

    public void setSname(String sname) {
        this.sname = sname;
    }

    public void setSid(Integer sid) {
        this.sid = sid;
    }

    public Set<Teacher> getTeachers() {
        return teachers;
    }

    public void setTeachers(Set<Teacher> teachers) {
        this.teachers = teachers;
    }

    @Override
    public String toString() {
        return "Schoolmaster{" +
                "sid=" + sid +
                ", sname='" + sname + '\'' +
                ", teachers=" + teachers +
                '}';
    }
}
